package cn.com.jenson.entity.log;

import cn.com.jenson.common.BasicEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import java.util.Date;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
public class ParkingLog extends BasicEntity {
    private String carPlate;
    private Integer money;
    private String paymentMethod;
    private Date inDate;
    private Date outDate;
    private Boolean isMember;

    public ParkingLog(String carPlate, Date inDate,Boolean isMember) {
        this.carPlate = carPlate;
        this.inDate = inDate;
        this.isMember = isMember;
    }

    public ParkingLog(ParkingLog log,Integer money, String paymentMethod, Date outDate) {
        this.carPlate = log.getCarPlate();
        this.inDate = log.getInDate();
        this.isMember = log.getIsMember();
        this.money = money;
        this.paymentMethod = paymentMethod;
        this.outDate = outDate;
    }
}
